package com.fig.spring;

import com.fig.spring.beans.Cat;
import com.fig.spring.beans.Person;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainTest {
	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
		Person bean = context.getBean(Person.class);
		bean.setCat(new Cat());
/*		Person bean2 = 	context.getBean(Person.class);
		System.out.println("Person:");
		Cat cat = bean.getCat();
		Cat cat1 = bean2.getCat();
		System.out.println(cat1==cat);*/
		System.out.println(bean);

	}
}
